<?php
/**
 * Article.php
 *
 * @copyright   2023 thingsworld.com.cn - All Rights Reserved
 * @link        http://thingsworld.com.cn/
 * @author      stiffer.chen <chenl@thingsworld.com.cn>
 * @created     2023-06-08 15:44:06
 * @modified    2023-06-08 15:44:06
 *
 */

namespace App\Models\Product\Type;

use App\Models\ArticleModel;
use App\Models\BaseModel;

class Article extends BaseModel
{
    protected $table = 'product_type_article';
    protected $primaryKey = 'id';
    public $timestamps = true;
    public const CREATED_AT = 'create_time';
    public const UPDATED_AT = 'update_time';

    protected $fillable = [
        'product_type_id',
        'article_id',
    ];

    public function article()
    {
        return $this->belongsTo(ArticleModel::class);
    }
}